﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using SUMO.MediaBrowser.ViewModel;
using USTF.Media.MediaService;

namespace SUMO.MediaBrowser.Controls
{
    public class MediaItemEditorController
    {
        /// <summary>
        /// Determines which editing control (dialog) to return for use based on the type of the media item
        /// </summary>
        /// <param name="dataItem"></param>
        /// <returns></returns>
        public static IMediaItemEditor GetEditingControlForMediaItem(HierarchicalMediaItem dataItem)
        {
            if (dataItem.CurrentItem.MediaType == MediaType.Image)
            {
                return new Umbraco.ImageEditor(new EditingHierarchicalMediaItem(dataItem));
            }

            throw new ArgumentException("This media type is not supported");
        }
    }
}
